﻿myApp.factory('MuseumService', ['$http', '$q', function ($http, $q) {
    // REMINDER....  expose public method

    // get all the mus...
    var getAll = function () {
        var def = $q.defer();
        $http.get('api/showmuseums')
        .success(function (data) {
            def.resolve(data);
        })
        .error(function () {
            def.reject();
        });
        return def.promise;
    }

    return {
        doGetAll: getAll
    }

}])